n = int(input())
s = n*(n-1)/4
for i in range(1, n + 1):
    s *= i
    s %= 998244353
print(int(s))
